﻿@{
    Layout = null;
}
@model LoginVM
<!DOCTYPE html>
<html>
<head>
    <title>Q.FunnyFace 内容管理系统--登录</title>
    <link href="/favicon.ico" type="image/x-icon" rel="icon" />
    <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />
    <link href="/Content/Login/login.css?@CommonSetting.JsVersion" rel="stylesheet" />
    <script src="/Scripts/jquery-1.8.2.min.js?@CommonSetting.JsVersion"></script>
    <script src="/Scripts/jquery.validate.min.js?@CommonSetting.JsVersion"></script>
    <script src="/Scripts/jquery.validate.unobtrusive.min.js?@CommonSetting.JsVersion"></script>
    <script src="/Scripts/shortcuts_v1.js?@CommonSetting.JsVersion"></script>
    <script type="text/javascript">
        $(function () {

            $("#validateCode").click(function () {
                $(this).attr("src", '@Url.Action("GetValidateCode")?time=' + (new Date()).getTime());
            });

            $("#submit").click(function () {
                $("#loginForm").submit();
            });

            $.shortcut("enter", function () {
                $("#submit").trigger("click");
            });
        });
    </script>
    <style type="text/css">
        .txtCode {
            margin-left:3px;
        }
    </style>
</head>
<body>
    @using (Html.BeginForm("Login", "Login", FormMethod.Post, new { id = "loginForm" }))
    {
        <div id="LoginWrapper">
            <div id="LoginForm">
                <div id="TopMessage">
                    欢迎登录 
                </div>
                <div class="loginItems">
                    <div class="loginLabel">
                        用户名：
                    </div>
                    <div class="loginForm">
                        <div id="loginNameWrapper">
                            @Html.TextBoxFor(Model => Model.LoginName, new { @class = "txts" })
                        </div>
                    </div>
                </div>
                <div class="loginItems">
                    <div class="loginLabel">
                        密 码：
                    </div>
                    <div class="loginForm">
                        <div id="loginPasswordWrapper">
                            @Html.PasswordFor(Model => Model.LoginPassword, new { @class = "txts" })
                        </div>
                    </div>
                </div>
                <div class="loginItems">
                    <div class="loginLabel">
                        验证码：
                    </div>
                    <div class="loginForm">
                        <div id="loginCode">
                            @Html.TextBoxFor(Model => Model.LoginCode, new { @class = "txtCode" })
                            @*<input id="LoginCode" class="txtCode" type="text" />*@
                        </div>
                        <div id="loginCodeImage">
                            <img id="validateCode" src='@Url.Action("GetValidateCode")' width="68" height="24"
                            alt="点击刷新" />
                        </div>
                    </div>
                </div>
                <div class="loginItems">
                    <div class="loginLabel">
                        有效期：
                    </div>
                    <div class="loginForm">
                        <div id="loginIndateWrapper">
                            @Html.RadioButtonFor(Model => Model.Indate, "oneDay", new { id = "oneDay" })
                            @*<input id="oneDay" name="Indate" type="radio" value="oneDay" />*@
                            <label for="oneDay">
                                一天</label>
                            @Html.RadioButtonFor(Model => Model.Indate, "oneWeek", new { id = "oneWeek" })
                            @*<input id="oneWeek" name="Indate" type="radio" value="oneWeek" />*@
                            <label for="oneWeek">
                                一周</label>
                            @Html.RadioButtonFor(Model => Model.Indate, "oneMonth", new { id = "oneMonth" })
                            @*<input id="oneMonth" name="Indate" type="radio" value="oneMonth" />*@
                            <label for="oneMonth">
                                一月</label>
                        </div>
                    </div>
                </div>
                <div class="loginItems">
                    <div id="submit">
                        登 录
                    </div>
                    <div id="forgetPassword">
                        <a href="javascript:void(0);">忘记密码？</a>
                    </div>
                </div>
                <div class="loginItems">
                    <div id="loginErrorMessage">
                        @Html.ValidationSummary(false)
                    </div>
                </div>
            </div>
            <div id="LoginImage">
            </div>
        </div>
    }
</body>
</html>
